package com.develophelper.example.mybatis.domain.handler;

import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
import com.develophelper.example.mybatis.domain.entity.UserExample;
import com.develophelper.example.mybatis.domain.repository.UserMapper;
import com.develophelper.example.mybatis.domain.entity.User;
/**

*@author snaildev

*@date 2020/12/04

**/
@Service
public class UserHandler {

    @Resource
    private UserMapper userMapper;

    
    public long countByExample(UserExample example) {
        return userMapper.countByExample(example);
    }

    
    public int deleteByExample(UserExample example) {
        return userMapper.deleteByExample(example);
    }

    
    public int deleteByPrimaryKey(Integer id) {
        return userMapper.deleteByPrimaryKey(id);
    }

    
    public int insert(User record) {
        return userMapper.insert(record);
    }

    
    public int insertSelective(User record) {
        return userMapper.insertSelective(record);
    }

    
    public List<User> selectByExample(UserExample example) {
        return userMapper.selectByExample(example);
    }

    
    public User selectByPrimaryKey(Integer id) {
        return userMapper.selectByPrimaryKey(id);
    }

    
    public int updateByExampleSelective(User record,UserExample example) {
        return userMapper.updateByExampleSelective(record,example);
    }

    
    public int updateByExample(User record,UserExample example) {
        return userMapper.updateByExample(record,example);
    }

    
    public int updateByPrimaryKeySelective(User record) {
        return userMapper.updateByPrimaryKeySelective(record);
    }

    
    public int updateByPrimaryKey(User record) {
        return userMapper.updateByPrimaryKey(record);
    }

    
    public int batchInsert(List<User> list) {
        return userMapper.batchInsert(list);
    }

}
